<%-------------------------------------------------------------------
 * 页面名称：acctBalHis.jsp
 * 功能描述：余额流水查询
 * Action: cn.agiledata.bank.myspace.action.AccountQueryAction
 *
 *-------------------------------------------------------------------
--%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ page import="java.util.*,cn.agiledata.bank.common.servlet.InitForString"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/conf/tld/struts-bean.tld" prefix="bean"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="ipb" uri="/WEB-INF/conf/tld/ipb.tld"%>
<%@ taglib prefix="ad" uri="agiledata"%>
<%
String path = request.getContextPath();
%>

<script language=javascript src="<%=path%>/js/popcalendar.js"></script>
<script language="javascript">
	function doSearch() {
		var beginDateObj = getObj('beginDate');
		if (beginDateObj.value!="") {
			if (!checkDateInput(beginDateObj)) {
				return;
			}
		}
		
		var endDateObj = getObj('endDate');
		if (endDateObj.value!="") {
			if (!checkDateInput(endDateObj)) {
				return;
			}
			if (beginDateObj.value!="") {
				if (compareDate(beginDateObj.value, endDateObj.value)<0) {
					alert("起始日期不能大于结束日期！");
					return;
				}
			}
		}
		
		document.forms["0"].submit();
	}
</script>
<div id="main">
	<!-- 余额流水模块开始 -->
	<div class="content_right">
		<div style="width:745px;margin-left:10px;">
			<div class="titleinfo">
				余额流水
			</div>
			<html:form action="acctBalHis.do" method="post">
				<div class="choosezhanghu">
					请选择账户名称:
					<html:select property="subAccountID">
						<html:option value="">所有账户</html:option>
						<html:optionsCollection name="account" property="subAccounts"
							label="accountName" value="id" />
					</html:select>
					<span style="margin-left:130px;"> 交易日期:从 <ad:calendar
							property="beginDate" path="<%=path%>" size="12" />到&nbsp;<ad:calendar
							property="endDate" path="<%=path%>" size="12" /> </span>
					<input name="searchButton" type="button" value="查 询"
						class="button_style" onclick="doSearch();" />
				</div>

				<table width="100%" class="tablestyle">
					<tr>
						<th>
							<span class="blue14">子账户名称</span>
						</th>
						<th>
							<span class="blue14">交易对方</span>
						</th>
						<th>
							<span class="blue14">收/付</span>
						</th>
						<th>
							<span class="blue14">交易金额</span>
						</th>
						<th>
							<span class="blue14">余额金额</span>
						</th>
						<th>
							<span class="blue14">冻结金额</span>
						</th>
						<th>
							<span class="blue14">费用</span>
						</th>
						<th>
							<span class="blue14">交易时间</span>
						</th>
						<th>
							<span class="blue14">交易编号</span>
						</th>
					</tr>
					<logic:iterate id="aqb" indexId="ind" name="pagination"
						property="data">
						<logic:present name="aqb">
							<tr <%if(ind.intValue()  % 2 == 0) { %> class="tableWhiteBg"
								<%}else{%> class="tableBlueBg" <%}%>>
								<td height="28" align="center">
									<bean:write name="aqb" property="thisAccountName" />
								</td>
								<td align="center">
									<logic:equal name="aqb" property="actionType" value="账户间交易">
										<logic:equal name="aqb" property="accountType" value="C">
											<bean:write name="aqb" property="accountName" />
										</logic:equal>
										<logic:notEqual name="aqb" property="accountType" value="C">
											<a
												href="<%=path%>/page/common/getAccount.do?accountId=<bean:write name="aqb" property="otherSubAccountId"/>"
												class="bluefont12u"><bean:write name="aqb"
													property="accountName" />
											</a>
										</logic:notEqual>
									</logic:equal>
									<logic:notEqual name="aqb" property="actionType" value="账户间交易">
										<bean:write name="aqb" property="accountName" />
									</logic:notEqual>
								</td>
								<td align="center">
									<bean:write name="aqb" property="payMode" />
								</td>
								<td align="center">
									<ad:FormatPrase>
										<bean:write name="aqb" property="amount" />
									</ad:FormatPrase>
								</td>
								<td align="center">
									<ad:FormatPrase>
										<bean:write name="aqb" property="balance" />
									</ad:FormatPrase>
								</td>
								<td align="center">
									<ad:FormatPrase>
										<bean:write name="aqb" property="lockAmount" />
									</ad:FormatPrase>
								</td>
								<td align="center">
									<ad:FormatPrase>
										<bean:write name="aqb" property="fee" />
									</ad:FormatPrase>
								</td>
								<td align="center">
									<bean:write name="aqb" format="yyyy-MM-dd HH:mm:ss"
										property="upDate" />
								</td>
								<td align="center">
									<a
										href="<%=path%>/page/transaction/accountHisQueryDetail.do?transactionID=<bean:write name="aqb" property="tid" />"
										class="bluefont12u"><bean:write name="aqb"
											property="transId" />
									</a><a
										href="<%=path%>/page/transaction/accountHisQueryDetail.do?transactionID=<bean:write name="aqb" property="tid" />"
										class="bluefont12u"></a>
								</td>
							</tr>
						</logic:present>
					</logic:iterate>
				</table>

				<div
					style="text-align:center;margin-top:20px;font-size:13px;height:40px;border-bottom:1px #CCCCCC dashed;">
					<ad:PageBean name="pagination" />
				</div>
			</html:form>
			<div style="text-align:center;margin-top:20px;">
				<input type="button" name="return" value="返 回" class="button_style"
					onclick="loading('<%=path%>/route.do?modual=space$account');" />
			</div>
		</div>
	</div>
	<!-- 余额流水模块结束 -->
</div>
